<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="YanGo(YanGo520@163.com)" content="">
  <title>留言板后台-首页</title>
  <link rel="stylesheet" href="/public/layui/css/layui.css">
  <link rel="stylesheet" href="/public/css/common.css">
	<script src="/public/js/jquery.min.js"></script>
</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div class="layui-logo">留言板后台</div>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item">
					<a href="javascript:;">
						<img src="/public/images/admin.png" class="layui-nav-img">
						<span><%= name %></span>
					</a>
					<dl class="layui-nav-child">
						<dd><a href="">基本资料</a></dd>
						<dd><a href="/admin/logout">安全退出</a></dd>
					</dl>
				</li>
				<li class="layui-nav-item"><a href="">前往前台</a></li>
			</ul>
		</div>
		
		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				<ul class="layui-nav layui-nav-tree"  lay-filter="test">
					<li class="layui-nav-item layui-nav-itemed">
						<a class="" href="javascript:;">主页</a>
						<dl class="layui-nav-child">
							<dd><a _href="/admin/home">控制台</a></dd>
						</dl>
					</li>
					<li class="layui-nav-item">
						<a href="javascript:;">用户</a>
						<dl class="layui-nav-child">
							<dd><a _href="/admin/user">网站用户</a></dd>
							<dd><a _href="/admin/admin_list">后台管理员</a></dd>
						</dl>
					</li>
					<li class="layui-nav-item">
						<a href="javascript:;">留言</a>
						<dl class="layui-nav-child">
							<dd><a _href="/admin/message">留言管理</a></dd>
							<dd><a _href="/admin/comment">评论管理</a></dd>
						</dl>
					</li>
				</ul>
			</div>
		</div>
		
		<div class="layui-body">
			<!-- 内容主体区域 -->
			<iframe class="page-iframe" src="/admin/home" width="" height=""></iframe>
		</div>
		
		<div class="layui-footer">
			<!-- 底部固定区域 -->
			<p>
				<span>开发者：YanGo (YanGo520@163@.com)</span>
				<span> CSDN地址： </span>
				<a style="color: #007DDB;" href="https://blog.csdn.net/weixin_39644462">传送门</a>
			</p>
		</div>
	</div>
</body>
<script src="/public/layui/layui.js"></script>
<script>
	//JavaScript代码区域
	layui.use('element', function(){
		var element = layui.element;
	});
	// 切换页面
	$(function(){
		
		$(".layui-nav-child dd a").on("click",function(){
			let url = $(this).attr('_href');
			$(".page-iframe").attr("src",url);			
		})
	});
</script>
</html>